package com.bw.elastic.controller;

import com.bw.common.core.domain.Result;
import com.bw.elastic.service.PmsSpuInfoService;
import com.bw.elastic.vo.SearchParam;
import com.bw.elastic.vo.SearchResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.io.IOException;
import java.util.List;

@RequestMapping("pmsSkuInfo")
@RestController
public class pmsSkuInfoController {
    @Autowired
    private PmsSpuInfoService pmsSkuInfoService;

    @GetMapping("search")
    public Result<SearchResult> search(SearchParam searchParam) throws IOException {
       SearchResult searchResult = pmsSkuInfoService.seach(searchParam);
       return Result.success(searchResult);
    }
}
